import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
class ShopMiddleware extends GetMiddleware{
  @override
  RouteSettings? redirect(String? route) {
    // TODO: implement redirect
    /// redirect	在跳转之前决定是否跳转到别的页面（常用于登录判断）
    return null ;//返回之前的页面
    return super.redirect(route);
  }
  @override
  GetPage? onPageCalled(GetPage? page) {
    /// onPageCalled	页面构建前执行
    // TODO: implement onPageCalled
    return super.onPageCalled(page);
  }
  @override
  List<Bindings>? onBindingsStart(List<Bindings>? bindings) {
    // TODO: implement onBindingsStart
    /// onBindingsStart	绑定依赖前执行
    return super.onBindingsStart(bindings);
  }
  @override
  GetPageBuilder? onPageBuildStart(GetPageBuilder? page) {
    // TODO: implement onPageBuildStart
    /// onPageBuildStart	页面构建开始时执行
    return super.onPageBuildStart(page);
  }
  @override
  Widget onPageBuilt(Widget page) {
    /// onPageBuilt	页面构建完成后执行
    // TODO: implement onPageBuilt
    return super.onPageBuilt(page);
  }
  @override
  void onPageDispose() {
    /// 页面销毁前执行
    // TODO: implement onPageDispose
    super.onPageDispose();
  }
}



